package com.ddx.dao;

import com.ddx.dto.ShoppingProductVo;
import com.ddx.pojo.ShoppingProduct;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ShoppingProductMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(ShoppingProduct record);

    int insertSelective(ShoppingProduct record);

    ShoppingProduct selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(ShoppingProduct record);

    int updateByPrimaryKeyWithBLOBs(ShoppingProduct record);

    int updateByPrimaryKey(ShoppingProduct record);

    /**
     * 查询
     * @param shoppingProductVo
     * @return
     */
    List<ShoppingProduct> selectByRecord(ShoppingProductVo shoppingProductVo);
    /**
     * 更改点击量
     * @param record
     * @return
     */
    int updateHitById(ShoppingProduct record);

    int updateSellcountById(ShoppingProduct record);

    int countByParam(@Param("storeId") int storeId, @Param("status") int status);

    List<ShoppingProduct> selectByParam(@Param("storeId") int storeId, @Param("status") int status, @Param("index") int index, @Param("size") int size);

    void batchEdit(@Param("productIdList") List<Integer> productIdList, @Param("status") Integer status);
}